#pragma once;

#include "common.h"
#include "collision_primitive.h"


class SceneObject
{
private:
	void setPickColor()
	{
		static unsigned char gColorID[3] = {1,0,0};

		m_colorID[0] = gColorID[0];
		m_colorID[1] = gColorID[1];
		m_colorID[2] = gColorID[2];

		gColorID[0]++;
		if(gColorID[0] > 255)
		{
			gColorID[0] = 0;
			gColorID[1]++;
			if(gColorID[1] > 255)
			{
				gColorID[1] = 0;
				gColorID[2]++;
			}
		}
	}
public:
	unsigned char m_colorID[3];
public:
	
	SceneObject()
	{
		setPickColor();
	}
	virtual ~SceneObject() {};

	virtual void vRender()  {};
	virtual void vPicking()  {};
	
	virtual Vec3f vGetPosition()  { return Vec3f(0.0f); }
	virtual void vSetPosition(const Vec3f &newPos) = 0;
	virtual void vSetOrientation(const Quatf &newOrient) {} // TODO move to interface?
	virtual Quatf vGetOrientation() { return Quatf(1.0f, 0.0f, 0.0f, 0.0f); }

	virtual void vScale( Vec3f scaleAxis, float scaleMagnitude ){}  // TODO move to interface?


	virtual bool vIsManipulator() const = 0;
	virtual void vInteractWith( SceneObject *mutator ) = 0;
	virtual void getGLTransform(float mtx[16] ) const = 0; 
};